package com.feri.findlife.service.impl;

import com.feri.findlife.dao.DisabuseDao;
import com.feri.findlife.pojo.Disabuse;
import com.feri.findlife.service.intf.DisabuseService;
import com.feri.findlife.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: FindLife
 * @description:
 * @author: Feri(邢朋辉)
 * @create: 2020-12-22 11:32
 */
@Service
public class DisabuseServiceImpl implements DisabuseService {
    @Autowired
    private DisabuseDao disabuseDao;
    @Override
    public R save(Disabuse disabuse) {
        if(disabuseDao.add(disabuse)>0){
            return R.ok();
        }else {
            return R.fail();
        }
    }
    @Override
    public R all(int wid) {
        if(wid>0){
            return R.ok(disabuseDao.all(wid));
        }else {
            return R.fail();
        }
    }
}
